<?php
/*
 * Created on Nov 3, 2009
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
?>
<?php
include_once(SELFPATH.'cms/fckeditor.php');
?>
<form action="<?=site_url()?>?c=newsletter&m=send_newsletter" method="post" id="sendNewsletterForm">
<table class="form-table" cellpadding="5" cellspacing="0" style="width: 100%;">
	<thead>
		<tr>
			<th colspan="2">Send Email</th>
		</tr>
		<tr>
        	<td colspan="1" style="background: #ffffff url('<?=cms_base_url()?>img/layout/top_li.gif') no-repeat top left;">&nbsp;</td>
        	<td style="background: #ffffff url('<?=cms_base_url()?>img/layout/top_r.gif') no-repeat top right;">&nbsp;</td>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td style="vertical-align: top; padding-left: 10px;">Subject: </td>
			<td><input type="textfield" name="subject" value="" maxlength="127" style="width: 380px;"/></td>
		</tr>
		<tr>
			<td style="vertical-align: top; padding-left: 10px;">Content: </td>
			<td>
				<?php
				$sBasePath = base_url().'cms/';
				//$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, " " ) ) ;

				$oFCKeditor = new FCKeditor('content') ;
				$oFCKeditor->ToolbarSet = 'Text';
				$oFCKeditor->Width   	= '840' ;
				$oFCKeditor->Height	    = '700' ;
				$oFCKeditor->BasePath	= $sBasePath ;
				$oFCKeditor->Value		= $this->load->view("newsletter/template_email", array('emails' => $emails, 'newsletters' => $newsletters), true);
				$oFCKeditor->Create();
				?>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
	    	<td class=""><input name="send" type="submit" class="" value="Send mail"/></td>
	    </tr>
	</tbody>
	<tfoot>
	    <tr>
        	<td style="background: #ffffff url('<?=cms_base_url()?>img/layout/bo_li.gif') no-repeat bottom left;" colspan="1">&nbsp;</td>
        	<td style="background: #ffffff url('<?=cms_base_url()?>img/layout/bo_r.gif') no-repeat bottom right;" colspan="1" align="right">&nbsp;</td>
        </tr>
	</tfoot>
</table>
</form>